Пример #1
0
 public static IEnumerable <UcatalogoSexo> ObtenerCatalogoSexo()
 {
     try
     {
         IEnumerable <UcatalogoSexo> lstXeso = new List <UcatalogoSexo>();
         using (FunnyPlaceBetaContext context = new FunnyPlaceBetaContext())
         {
             lstXeso = context.UcatalogoSexo.ToList();
         }
         return(lstXeso);
     }
     catch (Exception _exc)
     {
         throw _exc;
     }
 }
Пример #2
0
 internal static object restrarUsuarioAuth(UserOauthRegister userAuth)
 {
     try
     {
         using (FunnyPlaceBetaContext context = new FunnyPlaceBetaContext())
         {
             context.Add <UserOauthRegister>(userAuth);
             context.SaveChanges();
             return(true);
         }
     }
     catch (Exception _exc)
     {
         throw _exc;
     }
 }
Пример #3
0
 internal static bool registrarUsuario(UserRegister u)
 {
     try
     {
         using (FunnyPlaceBetaContext context = new FunnyPlaceBetaContext())
         {
             context.Add <UserRegister>(u);
             context.SaveChanges();
             return(true);
         }
     }
     catch (Exception _exc)
     {
         throw _exc;
     }
 }
Пример #4
0
 internal static bool loginUser(LoginGeneric log)
 {
     try
     {
         using (FunnyPlaceBetaContext context = new FunnyPlaceBetaContext())
         {
             var result = context.UserRegister.Where(c => c.Email == log.email && c.Password == log.password).FirstOrDefault();
             if (result != null)
             {
                 return(true);
             }
             else
             {
                 return(false);
             }
         }
     }
     catch (Exception _exc)
     {
         throw _exc;
     }
 }