public static bool LoadByID(int id, AppLog appLog) { if (appLog != null) { using (var context = new AppLogContext(CONNECTION)) { var data = AppLogCompiledQuery.GetAppLogByID(context, id).FirstOrDefault(); if (data != null) { appLog = new AppLog { AppLogID = data.AppLogID, TypeLuid = data.TypeLuid, Date = data.Date, Text = data.Text }; return(appLog.AppLogID.HasValue); } } } return(false); }
public static List <AppLog> LoadByType(int typeID) { using (var context = new AppLogContext(CONNECTION)) { return(AppLogCompiledQuery.GetAppLogByType(context, typeID).ToList()); } }