public static IEnumerable <TimeEntryModel> GetAllTimeEntries(HomeworkHotlineEntities context) { try { var timeEntries = context.TimeEntries.Select(t => new TimeEntryModel { TimeEntryID = t.TimeEntryID, UserID = t.UserID, EntryDate = t.EntryDate, StartTime = t.StartTime, EndTime = t.EndTime, IsLocked = t.IsLocked, IsDeleted = t.IsDeleted, PayrollDate = t.PayrollDate }).Where(t => t.IsDeleted == false).ToList(); return(timeEntries); } catch (Exception ex) { return(null); } finally { // context.Configuration.ProxyCreationEnabled = true; } }
public static IEnumerable <SchoolModel> GetAllSchools(HomeworkHotlineEntities context) { try { var schools = context.Schools.Select(s => new SchoolModel { SchoolID = s.SchoolID, SchoolName = s.SchoolName, SchoolTypeID = s.SchoolTypeID, SchoolTypeName = s.SchoolType.SchoolTypeName, Address1 = s.Address1, Address2 = s.Address2, City = s.City, State = s.State, Zip = s.Zip, CountyID = s.CountyID, CountyName = s.County.CountyName, Phone = s.Phone, PrincipalName = s.PrincipalName, PrincipalEmail = s.PrincipalEmail, PEDS = s.PEDS, Census = s.Census, PredictedThirdGradeStudents = s.PredictedThirdGradeStudents, SchoolBoardDistrict = s.SchoolBoardDistrict, CityCouncilDistrict = s.CityCouncilDistrict, SonicPartner = s.SonicPartner, TitleOneSchool = s.TitleOneSchool, AppalachianRegion = s.AppalachianRegion, IsDeleted = s.IsDeleted, QuadrantID = s.QuadrantID, CreateDate = s.CreateDate, CreateBy = s.CreateBy, ModifiedDate = s.ModifiedDate, ModifiedBy = s.ModifiedBy }).Where(s => s.IsDeleted == false).ToList(); return(schools); } catch (Exception ex) { return(null); } finally { // context.Configuration.ProxyCreationEnabled = true; } }
public static IEnumerable <SchoolType> GetAllSchoolTypes() { try { using (var db = new HomeworkHotlineEntities()) { List <SchoolType> schoolTypes = (from s in db.SchoolTypes where s.IsDeleted == false select s).ToList(); return(schoolTypes); } } catch (Exception ex) { return(null); } }
public TeacherService(HomeworkHotlineEntities entities) { this.entities = entities; }
public StudentService(HomeworkHotlineEntities entities) { this.entities = entities; }
public SchoolService(HomeworkHotlineEntities entities) { this.entities = entities; }
public DonorService(HomeworkHotlineEntities entities) { this.entities = entities; }
public CallLogService(HomeworkHotlineEntities entities) { this.entities = entities; }
public TimeEntryService(HomeworkHotlineEntities entities) { this.entities = entities; }