public void Add() { UserExtendedManager _extendedManager = new UserExtendedManager(); User user = new User(); user.Password = user.sha256("123456"); user.ProfileId = 1; user.UserName = "******"; //user.CreatedAt = DateTime.Now; var result = _extendedManager.Add(user); Assert.NotNull(result); }
public User Post([FromBody] User user) { user.Password = user.sha256(user.Password); return(_extendedManager.Add(user)); }