public static Login GetLoginById(int id) { using (TimechasersEntities te = new TimechasersEntities()) { return(te.Login.Where(t => t.Id == id).FirstOrDefault()); } }
public static List <Deelnemer> GetAllDeelnemer() { using (TimechasersEntities te = new TimechasersEntities()) { return(te.Deelnemer.ToList()); } }
public static List <Blok> GetAllBlok() { using (TimechasersEntities te = new TimechasersEntities()) { return(te.Blok.Include(e => e.Veld).ToList()); } }
public static Deelnemer GetDeelnemerById(int id) { using (TimechasersEntities te = new TimechasersEntities()) { return(te.Deelnemer.Where(c => c.Id == id).FirstOrDefault()); } }
public static List <Event> GetAllEventByLoginId(int loginid) { using (TimechasersEntities te = new TimechasersEntities()) { return(te.Event.Where(c => c.LoginID == loginid).ToList()); } }
public static List <Blok> GetAllBlokByEventId(int eventid) { using (TimechasersEntities te = new TimechasersEntities()) { return(te.Blok.Where(c => c.EvenementID == eventid).Include(e => e.Veld).ToList()); } }
public static List <Ploeg> GetAllPloeg() { using (TimechasersEntities te = new TimechasersEntities()) { return(te.Ploeg.Include(e => e.PloegDeelnemer).ToList()); } }
public static List <Ploeg> GetAllPloegByVerenigingId(int verenigingid) { using (TimechasersEntities te = new TimechasersEntities()) { return(te.Ploeg.Where(c => c.VerenigingID == verenigingid).Include(e => e.PloegDeelnemer).ToList()); } }
public static Ploeg GetPloegById(int id) { using (TimechasersEntities te = new TimechasersEntities()) { return(te.Ploeg.Where(c => c.Id == id).Include(e => e.PloegDeelnemer).FirstOrDefault()); } }
public static Veld GetVeldById(int id) { using (TimechasersEntities te = new TimechasersEntities()) { return(te.Veld.Include(e => e.Ploeg).Where(c => c.Id == id).FirstOrDefault()); } }
public static List <Veld> GetAllVeld() { using (TimechasersEntities te = new TimechasersEntities()) { return(te.Veld.Include(e => e.Ploeg).ToList()); } }
public static List <Event> GetAllEvent() { using (TimechasersEntities te = new TimechasersEntities()) { return(te.Event.ToList()); } }
public static List <Veld> GetAllVeldByBlokId(int blokid) { using (TimechasersEntities te = new TimechasersEntities()) { return(te.Veld.Where(c => c.BlokID == blokid).Include(e => e.Ploeg).ToList()); } }
public static Event GetEventByGuid(string eventGuid) { using (TimechasersEntities te = new TimechasersEntities()) { return(te.Event.Where(t => t.EventGuid == eventGuid).FirstOrDefault()); } }
public static Event GetEventById(int id) { using (TimechasersEntities te = new TimechasersEntities()) { return(te.Event.Where(c => c.Id == id).FirstOrDefault()); } }
public static Event GetAllEventByGuid(string guid) { using (TimechasersEntities te = new TimechasersEntities()) { return(te.Event.Where(c => c.EventGuid == guid).FirstOrDefault()); } }
public static Persoon GetPersoonById(int id) { using (TimechasersEntities te = new TimechasersEntities()) { return(te.Persoon.Where(c => c.Id == id).FirstOrDefault()); } }
public static Blok GetBlokById(int id) { using (TimechasersEntities te = new TimechasersEntities()) { return(te.Blok.Where(c => c.Id == id).Include(e => e.Veld).FirstOrDefault()); } }
public static List <Vereniging> GetAllVereniging() { using (TimechasersEntities te = new TimechasersEntities()) { return(te.Vereniging.Include(e => e.Ploeg).Include(e => e.Event).Include(e => e.Persoon).ToList()); } }
public static Vereniging GetVerenigingById(int id) { using (TimechasersEntities te = new TimechasersEntities()) { return(te.Vereniging.Where(c => c.Id == id).Include(e => e.Ploeg).Include(e => e.Event).Include(e => e.Persoon).FirstOrDefault()); } }
public static List <Persoon> GetAllPersoonByVerenigingId(int verenigingid) { using (TimechasersEntities te = new TimechasersEntities()) { return(te.Persoon.Where(c => c.VerenigingID == verenigingid).ToList()); } }
public static List <Tijd> GetAllTijd() { using (TimechasersEntities te = new TimechasersEntities()) { return(te.Tijd.Include(e => e.Blok).Include(e => e.Ploeg).ToList()); } }
public static List <Tijd> GetAllTijdByPloegIdBlokId(int ploegid, int blokid) { using (TimechasersEntities te = new TimechasersEntities()) { return(te.Tijd.Where(e => e.PloegID == ploegid && e.BlokID == blokid).Include(e => e.Blok).Include(e => e.Ploeg).ToList()); } }
public static List <Persoon> GetAllPersoon() { using (TimechasersEntities te = new TimechasersEntities()) { return(te.Persoon.ToList()); } }
public static bool DeleteVerenigingById(int id) { using (TimechasersEntities te = new TimechasersEntities()) { te.Vereniging.Remove(te.Vereniging.Where(c => c.Id == id).Include(e => e.Ploeg).Include(e => e.Event).Include(e => e.Persoon).FirstOrDefault()); return(te.SaveChanges() > 0); } }
public static bool DeletePersoonById(int id) { using (TimechasersEntities te = new TimechasersEntities()) { te.Persoon.Remove(te.Persoon.Where(c => c.Id == id).FirstOrDefault()); return(te.SaveChanges() > 0); } }
public static bool DeletePloegById(int id) { using (TimechasersEntities te = new TimechasersEntities()) { te.Ploeg.Remove(te.Ploeg.Where(c => c.Id == id).Include(e => e.PloegDeelnemer).FirstOrDefault()); return(te.SaveChanges() > 0); } }
public static bool DeleteBlokById(int id) { using (TimechasersEntities te = new TimechasersEntities()) { te.Blok.Remove(te.Blok.Where(c => c.Id == id).Include(e => e.Veld).FirstOrDefault()); return(te.SaveChanges() > 0); } }
public static bool UsernameExist(string username) { using (TimechasersEntities te = new TimechasersEntities()) { Login login = te.Login.Where(t => t.Username == username).FirstOrDefault(); return(!(login == null || string.IsNullOrWhiteSpace(login.Username))); } }
public static bool DeleteDeelnemerById(int id) { using (TimechasersEntities te = new TimechasersEntities()) { te.PloegDeelnemer.Remove(te.PloegDeelnemer.Where(c => c.DeelnemerID == id).FirstOrDefault()); te.Deelnemer.Remove(te.Deelnemer.Where(c => c.Id == id).FirstOrDefault()); return(te.SaveChanges() > 0); } }