public Staff Create(StaffModel model) { return(new Staff { Name = model.Name, Department = model.Department, DOB = model.DOB, Address = model.Address, CreatedBy = model.CreatedBy, CreatedDate = DateTime.Now, ModifiedDate = DateTime.Now }); }
public Staff Edit(Staff entity, StaffModel model) { entity.StaffId = model.StaffId; entity.Name = model.Name; entity.Department = model.Department; entity.DOB = model.DOB; entity.Address = model.Address; entity.ModifiedBy = model.ModifiedBy; //entity.CreatedBy = model.CreatedBy; entity.ModifiedDate = DateTime.Now; //entity.CreatedDate = DateTime.Now; return(entity); }
public ProjectModel(Project project) { this.Assign(project); Staff = new StaffModel(); }