Base solution for your next web application

Activities of "mohammedthamer"

thanks....

how can call the class (the class constructure need 1 argument) public class PersonAppService : IPersonAppService { private readonly IRepository<Person> _personRepository;

public PersonAppService(IRepository&lt;Person&gt; personRepository)
{
    _personRepository = personRepository;
}

public void CreatePerson(CreatePersonInput input)
{        
    person = new Person { Name = input.Name, EmailAddress = input.EmailAddress };
    _personRepository.Insert(person);
}

}

please help me !

Question

hello how are you this code to insert

public class rep_user1:IUserApp
    {
        private  IRepository<user_information> _userRepository;

  
        public void Createuser(loginModel input)
        {
            //   input = new user_information { Name = input.name, EmailAddress = input.EmailAddress };
            var userval = new user_information();
            userval.name = input.UserName;
            userval.password = input.Password;
            _userRepository.Insert(userval); //proplem here  Object reference not set to an instance of an object.
        }
    }

and here add new account

loginModel us = new loginModel();
            us.UserName = "moh";
            us.Password = "1994";
    rep_user1 rp = new rep_user1();
           rp.Createuser(us);

proplem in IRepository.insert show Object reference not set to an instance of an object.

Regards......

how insert data to database using boilerplate framework

Showing 1 to 4 of 4 entries