public async Task <long> Add(NewRawMaterial model) { var entity = mapper.Map <ef.RawMaterial>(model); context.Add(entity); var rows = await context.SaveChangesAsync(); return(await Task.FromResult(entity.RawMaterialId)); }
public async Task <ActionResult <long> > Add(NewRawMaterial model) { model.CorpClientId = UserData.CorpClientId.Value; var id = await service.Add(model); if (id > 0) { return(Ok(id)); } return(new StatusCodeResult(304)); }
public async Task <long> Add(NewRawMaterial model) { return(await rawMaterialApp.Add(model)); }
public async Task <long> Add(NewRawMaterial model) { return(await rawMaterialRepository.Add(model)); }