public static Student StudentFromModelToStudent(AdminStudentViewModel student) { Student user = new Student() { StatusActive = student.StatusActive, ContactId = 0, }; return(user); }
public static User StudentFromModelToUser(AdminStudentViewModel student) { User user = new User() { UserName = student.UserName, LastName = student.LastName, FirstName = student.FirstName, Password = student.Password, DateBirth = student.DateBirth, CreateDate = student.CreateDate, City = student.City, Adress = student.Adress, Phone = student.Phone, Email = student.Email, Category = student.Category, }; return(user); }
public static AdminStudentViewModel UserFromDataToAminStudentView(Student student) { AdminStudentViewModel _view = new AdminStudentViewModel() { Id = student.Id, UserName = student.UserName, LastName = student.LastName, FirstName = student.FirstName, Password = student.Password, DateBirth = student.DateBirth, CreateDate = student.CreateDate, City = student.City, Adress = student.Adress, Phone = student.Phone, Email = student.Email, Category = student.Category, StatusActive = student.StatusActive, }; return(_view); }