public DtoRole ToDto(DtoStore store) { return(new DtoRole() { Id = this.Id, Role = this.RoleType, Store = store }); }
public void Create(DtoStore dtoStore) { var address = dtoStore.Address.ToRepository(); var id = Insert(address, "Address"); var store = Store.FromDto(dtoStore); store.Address_Id = id; Insert(store, "Store"); }
public void Update(DtoStore store) { var dbstore = store.ToRepository(); this.Update(dbstore, "Store"); if (store.Address != null) { var address = store.Address.ToRepository(); this.Update(address, "Address"); } }
public static IhChegou.Repository.Pharma.Model.Stores.Store ToRepository(this DtoStore dto) { if (dto == null) { return(null); } var model = new IhChegou.Repository.Pharma.Model.Stores.Store() { Id = dto.Id, MaxDistance = dto.MaxDistance, Document = dto.Document, Name = dto.Name, Profit = dto.Profit }; return(model); }
public static DtoStore ToDTO(this Pharma.Model.Stores.Store model) { if (model == null) { return(null); } var dto = new DtoStore() { Id = model.Id, Document = model.Document, Name = model.Name, MaxDistance = model.MaxDistance, Profit = model.Profit }; return(dto); }
public static Store FromDto(DtoStore dto) { if (dto == null) { return(null); } var model = new Store() { Id = dto.Id, MaxDistance = dto.MaxDistance, Document = dto.Document, Name = dto.Name, Profit = dto.Profit }; return(model); }
public static Stores.Store ToRepository(this DtoStore dto) { if (dto == null) { return(null); } var model = new Stores.Store() { Id = dto.Id, MaxDistance = dto.MaxDistance, Document = dto.Document, Email = dto.Email, Name = dto.Name, PasswordHash = dto.PasswordHash, Profit = dto.Profit }; return(model); }
public static DtoStore ToDTO(this Stores.Store model) { if (model == null) { return(null); } var dto = new DtoStore() { Id = model.Id, Document = model.Document, Email = model.Email, Name = model.Name, MaxDistance = model.MaxDistance, PasswordHash = model.PasswordHash, Profit = model.Profit }; return(dto); }
public void CreateStore(DtoStore store) { StoreDomain.Create(store); }
public void Update(DtoStore store) { storeRepository.Update(store); }
public void Create(DtoStore store) { storeRepository.Create(store); }
public void GetStores(DtoStore store) { StoreDomain.Update(store); }