Ejemplo n.º 1
0
 public static WareHouseDto EntityToDto(Infrastructure.Entities.WareHouse dto)
 {
     return(new WareHouseDto
     {
         Id = dto.Id,
         Name = dto.Name,
         CreatedBy = dto.CreatedBy,
         UpdatedBy = dto.UpdatedBy,
         CreatedDate = dto.CreatedDate,
         UpdatedDate = dto.UpdatedDate,
     });
 }
        public void CreateWareHouse(string name)
        {
            var newWareHouse = new Infrastructure.Entities.WareHouse()
            {
                Name = name
            };

            writeService.Repository <Infrastructure.Entities.WareHouse>().Insert(newWareHouse);
            writeService.SaveChanges();

            ApplyEvent(new WareHouseCreated(newWareHouse.Id, newWareHouse.Name));
        }