public int Update(AdminProfile profile)
        {
            AdminProfile profileToUpdate = this.context.AdminProfiles.SingleOrDefault(p => p.ID == profile.ID);

            profileToUpdate.Username = profile.Username;
            profileToUpdate.Email    = profile.Email;
            profileToUpdate.Password = profile.Password;
            return(this.context.SaveChanges());
        }
Example #2
0
        public AdminProfile GetAdmin(string Username, string Password)
        {
            AdminProfile admin = this.context.AdminProfiles.SingleOrDefault(e => e.Username == Username && e.Password == Password);

            return(admin);
        }