// // GET: /Sys_LockObject/ //// GET api/<controller> ///// <summary> ///// Lấy tất cả dữ liệu ///// </summary> ///// <returns></returns> public IEnumerable <Sys_LockObjectModel> Get() { string status = string.Empty; var service = new Sys_LockObjectServices(); var list = service.GetAllUseEntity <Sys_LockObjectEntity>(ref status); return(list.Translate <Sys_LockObjectModel>()); }
public Sys_LockObjectModel Put(Sys_LockObjectModel model) { var Sys_LockObject = model.CopyData <Sys_LockObjectEntity>(); var service = new Sys_LockObjectServices(); if (model.ID != Guid.Empty) { Sys_LockObject.ID = model.ID; service.Edit <Sys_LockObjectEntity>(Sys_LockObject); } else { service.Add <Sys_LockObjectEntity>(Sys_LockObject); } return(model); }