public ServiceGroup ServiceGroupByServiceGroupId(int serviceGroupId) { ServiceGroup serviceGroup = (from s in repository.ServiceGroups where s.Id == serviceGroupId select s).Single(); return(serviceGroup); }
public ServiceGroup CreateServiceGroup(int overseerId, int assistantId, string meetingLocation, string serviceMeetingTime) { ServiceGroup serviceGroup = new ServiceGroup(); serviceGroup.OverseerId = overseerId; serviceGroup.AssistantId = assistantId; serviceGroup.ServiceMeetingLocation = meetingLocation; serviceGroup.ServiceMeetingTime = serviceMeetingTime; serviceGroup.CreateDate = DateTime.Now; repository.ServiceGroups.Add(serviceGroup); repository.SaveChanges(); return(serviceGroup); }
public ServiceGroup CreateServiceGroup(int overseerId, int assistantId, string meetingLocation, string serviceMeetingTime) { ServiceGroup serviceGroup = new ServiceGroup(); serviceGroup.OverseerId = overseerId; serviceGroup.AssistantId = assistantId; serviceGroup.ServiceMeetingLocation = meetingLocation; serviceGroup.ServiceMeetingTime = serviceMeetingTime; serviceGroup.CreateDate = DateTime.Now; repository.ServiceGroups.Add(serviceGroup); repository.SaveChanges(); return serviceGroup; }