public CompanyEntity Update(Guid Id, CompanyEntity CompanyEntity) { Company Company = IMSContext.Companies.Where(c => c.Id == Id).FirstOrDefault(); CompanyEntity.ToModel(Company); IMSContext.SaveChanges(); return(Get(Id)); }
public CompanyEntity Create(UserEntity UserEntity, CompanyEntity CompanyEntity) { Company Company = CompanyEntity.ToModel(); IMSContext.Companies.Add(Company); IMSContext.SaveChanges(); return(CompanyEntity); }