예제 #1
0
        public async Task <ServicesResponse <List <VanderListDTO> > > Insert(AddVendorListDTO vender)
        {
            ServicesResponse <List <VanderListDTO> > servicesResponse = new ServicesResponse <List <VanderListDTO> >();
            Vender vender1 = _mapper.Map <Vender>(venders);

            vender1.Id = venders.Max(c => c.Id) + 1;
            venders.Add(vender1);
            servicesResponse.Data = (venders.Select(c => _mapper.Map <VanderListDTO>(c))).ToList();
            return(servicesResponse);
        }
예제 #2
0
 public async Task <IActionResult> Insert(AddVendorListDTO DTO)
 {
     return(Ok(await _VanderService.Insert(DTO)));
 }