public async Task <PM_ComponentCustomView> GetComponentsById(string componentid) { var cus = new PM_ComponentCustomView(); var model = await _PM_ComponentRepository.GetOneById(componentid); if (model != null) { cus = new PM_ComponentCustomView() { code = model.Code, dateEnd = model.DateEnd.ToString("dd/MM/yyyy HH:mm"), dateStart = model.DateStart.ToString("dd/MM/yyyy HH:mm"), description = model.Description, id = model.Id, title = model.Title, dateCreated = model.DateCreated.ToString("dd/MM/yyyy HH:mm"), note = model.Note }; } return(cus); }
public async Task <PM_Component> GetById(string id) { return(await _PM_ComponentRepository.GetOneById(id)); }