public Master SelectMasterProc(inUniResult select) { try { Master Id = iMasterDAO.Select_Master(select); //?????????????? return(Id); } catch (Exception e) { throw new Exception(); } }
public Master Select_Master(inUniResult select) { try { Master Id = _context.Master.FirstOrDefault(x => x.Id == select.Id); return(Id); } catch (Exception e) { throw new Exception(); } }
public void CreateMaster(inUniResult create) { try { Master _master = new Master { Value1 = create.value1, Value2 = create.value2, Id = Guid.NewGuid(), Date = DateTime.UtcNow }; iMasterDAO.CreateMaster(_master); } catch (Exception e) { throw new Exception(); } }
public void UpdateMaster(inUniResult update) { try { Master _master = new Master { Id = update.Id, Value1 = update.value1, Value2 = update.value2, Date = DateTime.UtcNow }; iMasterDAO.UpdateMaster(_master); } catch (Exception e) { throw new Exception(); } }
public outUniResult UpdateResult([FromBody] inUniResult update) { outUniResult _outUniResult = new outUniResult(); try { _outUniResult.StatusCode = StatusCodes.Status200OK; iMasterBLO.UpdateMaster(update); _outUniResult.Result = iMasterBLO.SelectMasterProc(update); _outUniResult.Error = null; return(_outUniResult); } catch (Exception e) { _outUniResult.StatusCode = (int)HttpStatusCode.NotFound; _outUniResult.Result = "發生錯誤"; _outUniResult.Error = null; return(_outUniResult); } }