public bool Register(User u, LoginCredentials l) { bool registerSuccess = false; try { int registerResult = linqDc.ProcRegister(u.FirstName, u.LastName, u.EmailAddress, u.Contact, u.City, u.DateOfBirth, l.Password); if (registerResult == 0) registerSuccess = true; } catch (Exception e) { errorInfo = Encoding.UTF32.GetBytes(e.Message + "\n" + e.StackTrace); errorLogDal = File.OpenWrite("E:\\Visual Studio Projects\\NKryptor\\ErrorLogs\\AccessLayers\\ErrorDal.log"); errorLogDal.Write(errorInfo, 0, errorInfo.Length); errorLogDal.Close(); } return registerSuccess; }
public Task<bool> RegisterAsync(User u, LoginCredentials l) { return Task.Run<bool>(() => Register(u, l)); }
public Task<bool> RegisterAsync(User u, LoginCredentials l) { return d.RegisterAsync(u,l); }