User Profile

Collapse

Profile Sidebar

Collapse
kdaic1712
kdaic1712
Last Activity: Jul 1 '21, 11:08 AM
Joined: Jun 30 '21
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • kdaic1712
    started a topic C#- Error in DbContext

    C#- Error in DbContext

    I work at Blazor (C #) Server- Side. I am trying to save data to a database when registering a user (when I press the register button), but the following error occurs:
    System.NullRefe renceException: 'The object reference is not set on the object instance.' <> 4__this._dataCo ntext.

    I read on the Internet about that mistake, but I couldn't figure out what the problem was with me.

    Find the code snippets below:...
    See more | Go to post

  • How do I add code that will show if a company exists? This should only be displayed as a message on the screen.

    Code:
    User.cs:
    [Table("Users")]
        public class User
        {
            [Display(AutoGenerateField = false)]
            public int UserId { get; set; }
    
            [Display(Name = "UserName")]
            [Required(ErrorMessage = "UserName is required.")]
            public string UserName { get; set; }
    
            [Display(Name = "Password")]
    ...
    See more | Go to post
No activity results to display
Show More
Working...