public int Login(LoginViewModel user) { try { user.password = USER_BLL.GenerateSHA256String(user.password); var _user = user_bll.authenticateUser(user); return(_user.id); } catch (Exception ex) { throw ex; } }
public object Register(UserViewModel user) { try { user.password = USER_BLL.GenerateSHA256String(user.password); var _generatedID = user_bll.registerUser(user); return(new { id = _generatedID, password = user.password }); } catch (Exception ex) { throw ex; } }