//פונקציה זו מוסיפה מפגשים חברתים למאגר public static Boolean submit(FreindlyEventDto Freindly) { try { Freindly.countValunteer = 0; FreindlyEvent f = FreindlyEventDto.convertDtoToDB((FreindlyEventDto)Freindly); db.FreindlyEvents.Add(f); // db.Valunteers.Add(ValunteerDto.convertDtoToDB(()valunteerDto[0])); db.SaveChanges(); return(true); } catch (Exception e) { return(false); } }
//פונקציה זו מחזירה את כל המפגשים החברתיים public static List <FreindlyEventDto> getListFmeeting() { return(FreindlyEventDto.convertDBToDtoList(db.FreindlyEvents.ToList())); }