internal static String Save(DB.SYS_MSG_Message entry, DataContext dataContext)
        {
            try
            {
                if (dataContext.EntitySystemContext.GetEntityState(entry) == EntityState.Detached)
                {
                    dataContext.EntitySystemContext.SYS_MSG_Message.Add(entry);
                }

                Validation.ValidateEntity(dataContext.EntitySystemContext, entry);
            }
            catch (Validation.EntityValidationException ex)
            {
                return(dataContext.PackageValidationException());
            }

            return("Success");
        }
 public static DB.SYS_MSG_Message GetPreviousItem(DB.SYS_MSG_Message SYS_MSG_Message, DataContext dataContext)
 {
     return(dataContext.EntitySystemContext.SYS_MSG_Message.OrderByDescending(o => o.Id).FirstOrDefault(n => n.Id.CompareTo(SYS_MSG_Message.Id) < 0 && n.Id.CompareTo(SYS_MSG_Message.Id) != 0));
 }