Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6749409
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:41:13+00:00 2026-05-26T12:41:13+00:00

Having this model class public class Usuario { #region Atributos private int _intID =

  • 0

Having this model class

public class Usuario
{
    #region Atributos
    private int _intID = 0;
    private Perfil _Perfil_FK = null;
    private String _strNombre = "";
    private String _strPassword = "";
    #endregion

    #region Propiedades
    public int ID
    {
        get { return _intID; }
        set { _intID = value; }
    }
    public virtual Perfil Perfil_FK
    {
        get { return _Perfil_FK; }
        set { _Perfil_FK = value; }
    }
    public int PerfilID { get; set; }
    public String Nombre
    {
        get { return _strNombre; }
        set { _strNombre = value; }
    }
    public String Password
    {
        get { return _strPassword; }
        set { _strPassword = value; }
    }
    #endregion
}

I’m trying to use this query, the data base table have data, so i can’t see the problem?

 Usuario user = (from U in _db.Usuario
                            where ((U.Nombre == model.UserName) && (U.Password == encripPassword))
                            select U).First();

If you need more info about the data base let me know to update my question

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T12:41:13+00:00Added an answer on May 26, 2026 at 12:41 pm
    • Does the table actually have a row with that name and password?
    • When you run the generated SQL statement in SQL Management Studio, do you get a result?

    Suggest checking your two values in UserName and encripPassword for valid values.

    Usuario user = _db.Usuario
                      .FirstOrDefault(x=>x.Nombre == model.UserName
                                     &&  x.Password == encripPassword);
    
    string sql = (user as ObjectQuery).ToTraceString(); //the SQL query generated.
    
    if(user==null)
    {
      //doesn't exist.
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following object model: class ObjectA{ public string Description {get;set;} } class
I have the following model public class Account { public int Id { get;
I have a class: public class Car { public string Model {get;set;} public string
Having this code... var b = new ReadOnlyCollection<int>(new[] { 2, 4, 2, 2 });
Having this line Cursor c = db.rawQuery(PRAGMA table_info(?), new String[] {tableName}); and getting this:
My sample classes: public class MyModel implements Model { : : } public class
Given this table: CREATE TABLE [Comments] ( [Id] [int] IDENTITY(1, 1) NOT NULL, [Text]
If i have a ViewModel like this: public class MyViewModel { [UIHint(SomeTemplate)] public ICollection<SomeViewModel>
I have a simple class that provides state codes like this: public class StateProvider
Here's my use case : public class User extends Model {} public class TableA

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.