This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
| <CodeSnippet Format="1.0.0"> | |
| <Header> | |
| <Title>Unit Test</Title> | |
| <Author>Rusty Divine</Author> | |
| <Description>Unit Test Template with 3 Parts</Description> | |
| <HelpUrl>https://msdn.microsoft.com/en-us/library/ms165394.aspx</HelpUrl> | |
| <SnippetTypes /> | |
| <Keywords /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Microsoft.CodeAnalysis; | |
| using Microsoft.CodeAnalysis.CSharp; | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.IO; | |
| using System.Reflection; | |
| using Microsoft.CodeAnalysis.Emit; | |
| namespace CSharpDynamicCompileExample |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Entities.Concrete; | |
| using Microsoft.EntityFrameworkCore; | |
| namespace DataAccess.Concrete.EntityFramework | |
| { | |
| // Context : Db tabloları ile proje içerisinde ki Entity Classlarını ilişkilendiriyor. | |
| public class NorthwindContext : DbContext | |
| { | |
| // DbContext : EntityFramework ile beraber gelen context nesnesidir. Biz burada değişiklik yapmak istediğimiz kısımları override ederek kullanıyoruz. | |
| // Proje çalışır çalışmaz direkt olarak buraya gelerek ilgili db bilgisini alıyor. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Core.Entities; | |
| namespace Entities.Concrete | |
| { | |
| public class Customer : IEntity | |
| { | |
| public string CustomerID { get; set; } | |
| public string CompanyName { get; set; } | |
| public string ContactName { get; set; } | |
| public string ContactTitle { get; set; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Collections.Generic; | |
| using Entities.Concrete; | |
| using Core.DataAccess; | |
| using Entities.Dtos; | |
| namespace DataAccess.Abstract | |
| { | |
| public interface ICustomerDal | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Entities.Concrete; | |
| using Core.DataAccess; | |
| namespace DataAccess.Abstract | |
| { | |
| // ICustomerDal bir IEntityRepository'dir ve aynı zamanda çalışma tipi de Customer. | |
| // ICustomerDal'ı Customer için yapılandırmış oluyoruz. | |
| public interface ICustomerDal : IEntityRepository<Customer> | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq.Expressions; | |
| using Core.Entities; | |
| namespace Core.DataAccess | |
| { | |
| /* | |
| - Burada bir Generic Repository Pattern deseni kullanıyoruz. | |
| - Gelen tipde değişiklik olacağından <T> olarak belirttik. Burada <T>, veritabanı üzerinde çalışacağı tipi belirtiyor. |