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

            return(Ok(updatedShelfDto));
        }
Exemplo n.º 4
0
        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;
 }
Exemplo n.º 6
0
        public void UpdateShelfInfo(ShelfInfoDto shelfInfoDto)
        {
            ShelfInfo = new ShelfInfo(shelfInfoDto);

            ModifiedDateTime = CreatedDateTime;
        }
Exemplo n.º 7
0
 public Shelf(ShelfInfoDto shelfInfoDto)
 {
     ShelfProducts = new List <ShelfProduct>();
     UpdateShelfInfo(shelfInfoDto);
 }