Example #1
0
        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));
        }
Example #2
0
        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));
        }
Example #3
0
 public async Task <long> Add(NewRawMaterial model)
 {
     return(await rawMaterialApp.Add(model));
 }
Example #4
0
 public async Task <long> Add(NewRawMaterial model)
 {
     return(await rawMaterialRepository.Add(model));
 }