public void ScreeningPost([FromBody] ScreeningBase value) { if (value == null) { throw new ArgumentNullException($"Argument value cannot be null"); } CU_B_SCREENING_EXT_AUS Item = EntityMapper.CreateEntity <CU_B_SCREENING_EXT_AUS>(); EntityMapper.UpdateEntity(value, Item); DBContext.CU_B_SCREENING_EXT_AUS.Add(Item); DBContext.SaveChanges(); }
public void ScreeningPut([FromBody] ScreeningBase value) { if (value == null) { throw new ArgumentNullException($"Argument value cannot be null"); } CU_B_SCREENING_EXT_AUS Item = DBContext.CU_B_SCREENING_EXT_AUS.SingleOrDefault(E => E.ROWGUID == value.RowGuid); if (Item == null) { throw new NotFoundException($"No screening found with id:{value.RowGuid}"); } EntityMapper.UpdateEntity(value, Item); Item.DT_UPDATE = DateTime.UtcNow; Item.USERUPDATE = "Microservices"; value.SaveData <CU_B_SCREENING_EXT_AUS>(DBContext, Item); DBContext.SaveChanges(); }