public CitySQLRepository(CustomerAppDBContext ctx) { var configuration = new MapperConfiguration(cfg => { cfg.CreateMap <City, CitySql>().ConvertUsing(new CityToCitySqlConverter()); cfg.CreateMap <CitySql, City>().ConvertUsing(new CitySqlToCityConverter()); }); configuration.AssertConfigurationIsValid(); _mapper = configuration.CreateMapper(); _ctx = ctx; }
public static void Seed(CustomerAppDBContext context) { context.Customers.Add(new Customer { Firstname = "Lars", Lastname = "Bilde", Address = "Uhhahahstrasse1", EMail = "jumbaimba.org" } ); context.SaveChanges(); }
public CustomerRepository(CustomerAppDBContext context) : base(context) { }
public CustomerSQLRepository(CustomerAppDBContext ctx) { _ctx = ctx; }
public AddressSQLRepository(CustomerAppDBContext ctx) { _ctx = ctx; }
public CountryRepository(CustomerAppDBContext ctx) { _ctx = ctx; }
public BaseRepository(CustomerAppDBContext context) { _context = context; }