示例#1
0
 public ShelfInfo(ShelfInfoDto ShelfInfoDto)
 {
     Name        = ShelfInfoDto.Name;
     Description = ShelfInfoDto.Description;
 }
 public ShelfCommandCreate(ShelfInfoDto shelfInfoDto)
 {
     ShelfInfoDto = shelfInfoDto;
 }
        public async Task <IActionResult> UpdateInfo(int id, [FromBody] ShelfInfoDto shelfInfoDto)
        {
            var updatedShelfDto = await _mediator.Send(new ShelfCommandUpdateInfo(id, shelfInfoDto));

            return(Ok(updatedShelfDto));
        }
        public async Task <IActionResult> Create([FromBody] ShelfInfoDto shelfInfoDto)
        {
            var shelfDto = await _mediator.Send(new ShelfCommandCreate(shelfInfoDto));

            return(Ok(shelfDto));
        }
 public ShelfCommandUpdateInfo(int id, ShelfInfoDto shelfInfoDto)
 {
     Id           = id;
     ShelfInfoDto = shelfInfoDto;
 }
示例#6
0
        public void UpdateShelfInfo(ShelfInfoDto shelfInfoDto)
        {
            ShelfInfo = new ShelfInfo(shelfInfoDto);

            ModifiedDateTime = CreatedDateTime;
        }
示例#7
0
 public Shelf(ShelfInfoDto shelfInfoDto)
 {
     ShelfProducts = new List <ShelfProduct>();
     UpdateShelfInfo(shelfInfoDto);
 }