예제 #1
0
        public ServiceGroup ServiceGroupByServiceGroupId(int serviceGroupId)
        {
            ServiceGroup serviceGroup = (from s in repository.ServiceGroups

                                         where s.Id == serviceGroupId

                                         select s).Single();

            return(serviceGroup);
        }
예제 #2
0
        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);
        }
예제 #3
0
        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;
        }