public async Task <bool> insertLoginInfo(LoginInfo loginInfo) { try { await _context.AddAsync(loginInfo); await _context.SaveChangesAsync(); } catch (Exception e) { return(false); } return(true); }
public async Task <Account> CreateFromUserAsync(Dtos.User user) { var entity = new Account() { UserId = user.Id, MonthlySalary = user.MonthlySalary, MonthlyExpenses = user.MonthlyExpenses, UserEmail = user.Email, UserName = user.Name, DateCreated = DateTime.Now }; await _accountContext.AddAsync(entity); await _accountContext.SaveChangesAsync(); return(entity); }
public async Task <Acc> CreateAsync(Acc account) { await _accountContext.AddAsync(account); return(account); }
public async Task CreateItem(Account account) { await _context.AddAsync(account); }
public async Task AddSistema(Sistema sistema) { await _accountContext.AddAsync(sistema); await _accountContext.SaveChangesAsync(); }
/// <summary> /// Generic Add() method to add new data into the database /// </summary> /// <param name="entity">Object entity using the generic Add()</param> /// <returns>Returns the object entity added to the database</returns> public async virtual Task <T> Add(T entity) { await _context.AddAsync(entity).ConfigureAwait(true); return(entity); }