“İnsanlar hayallerinize gülmüyorsa, hayalleriniz yeterince büyük değil demektir.” Robin Sharma

Yeni blog adresim https://fatihzor.github.io/

3 saniye içerisinde yönlendirileceksiniz...

My new blog address https://fatihzor.github.io/

You will be redirected in 3 seconds...

21 Mayıs 2017 Pazar

Microsoft’ta 7. Gün: XAMARIN VE WEBAPI Eğitimleri

Entity freamwork, her yeni versiyonda .Net ile veritabanı arasında ki bağlantıyı kurmamızı biraz daha kolaylaştırıyor. Code first mimarisi ise kodcu'lar için bulunmaz bir nimet. Peki, code first mimarisini neden böyle anlatıyorum? Code first, projemizi veritabanına göre yapılandırmaktansa projemize göre veritabınını yapılandırıyor.

   entity-aayazokulu  

 Entity freamwork üzerinde database first ve code first karşılaştırdığımızda;
  • Code First :
    1. Kod üzerinde bütün kontrol sizdedir.
    2. Database aslında bir depolama alanıdır. Bu depolama alanında vakit kaybetmemek için code first kullanmalıyız.
  • Database First :
    1. Çok popüler ve çoğu uygulama böyle yapılandırılıyor.
    2. Elimizde hazır bir veritabanı varsa database first kullanmak daha mantıklıdır.
    3. Modeli, her zaman veritabanından güncelleyebiliriz.
   
Code first
  • Very popular because hardcore programmers don't like any kind of designers and defining mapping in EDMX xml is too complex.
  • Full control over the code (no autogenerated code which is hard to modify).
  • General expectation is that you do not bother with DB. DB is just a storage with no logic. EF will handle creation and you don't want to know how it does the job.
  • Manual changes to database will be most probably lost because your code defines the database.
Database first
  • Very popular if you have DB designed by DBAs, developed separately or if you have existing DB.
  • You will let EF create entities for you and after modification of mapping you will generate POCO entities.
  • If you want additional features in POCO entities you must either T4 modify template or use partial classes.
  • Manual changes to the database are possible because the database defines your domain model. You can always update model from database (this feature works quite good).
  • I often use this together VS Database projects (only Premium and Ultimate version).
Model first
  • IMHO popular if you are designer fan (= you don't like writing code or SQL).
  • You will "draw" your model and let workflow to generate your database script and T4 template to generate yout POCO entities. You will lose part of control on both your entities and database but for small easy projects you will be very productive.
  • If you want additional features in POCO entities you must either T4 modify template or use partial classes.
  • Manual changes to database will be most probably lost because your model defines the database. This works better if you have Database generation power pack installed. It will allow you updating database schema (instead of recreating) or updating database projects in VS.
http://stackoverflow.com/questions/5446316/code-first-vs-model-database-first

    Web-APIs-v5_0 - aayazokulu  

 API kelimesi Application Programming Interface anlamına gelmektedir.  Asp.Net MVC 4.0 ile birlikte gelen WebAPI, uygulamamıza birden fazla yerden erişmemizi sağlayarak bize büyük kolaylık sağlar. WebAPI servisi, RESTful mimarisini kullanır ve platform bağımsızdır. Bize ne faydası olacak bu servisin? Bu servis, tek veritabanı ile birden fazla platformdaki uygulamalarımızı bağlamımızı sağlar. Ayrıca, servis ile istenen data tek bir yer altından ve global bir logic ile temin edilir.  

Eğitmen bilgilerine ve günlük akışa sosyal medya hesaplarından #aayazokulu hashtagi ile ulaşabilirsiniz.

Hiç yorum yok:

Yorum Gönder

Blogger tarafından desteklenmektedir.
banner image

Random Posts

randomposts

İletişim Formu

Ad

E-posta *

Mesaj *

Recent Posts

recentposts
banner image