public void CreateUser(string name, string email, string password) { var item = new DAL.Interface.Entities.User { Name = name, Email = email, Password = password }; userRepository.Add(item); userRepository.AddUserRole(email, "Пользователь"); }
public static User ToBll(this DAL.Interface.Entities.User item) { return(new User { Id = item.Id, Name = item.Name, Email = item.Email, Role = item.Role.Value.ToBll(), UserImages = item.UserImages == null ? new List <UserImage>() : item.UserImages.Value.Select(r => r.ToBll()).ToList() }); }