public bool AddUser(User user) { string hash = user.HashCode; string input = Hashhelper.GetProperty(user); if (Hashhelper.VerifyMd5Hash(input, hash)) { AddUserService us = new AddUserService(); bool state = us.AddUser(user); return(state); } return(false); }
public IEnumerable <spSearch_Result> Search([FromBody] Test test) { string hash = test.HashCode; string input = Hashhelper.GetProperty(test); if (Hashhelper.VerifyMd5Hash(input, hash)) { AddUserService us = new AddUserService(); var state = us.Search(test); log.DebugFormat("WebApi got letter {0}.", test.Letter); return(state); } else { return(null); } }