public void UpdateAccount(WhatYouGotLibrary.Models.Account account) { Entities.Account currentAccount = _context.Account.Find(account.Id); Entities.Account newAccount = Mapper.Map(account); _context.Entry(currentAccount).CurrentValues.SetValues(newAccount); }
public static Entities.Account Map(WhatYouGotLibrary.Models.Account account) { return(new Entities.Account { Id = account.Id, Username = account.Username, Passphrase = account.Passphrase, FirstName = account.FirstName, LastName = account.LastName, Email = account.Email }); }
public void AddAccount(WhatYouGotLibrary.Models.Account account) { Entities.Account newAccount = Mapper.Map(account); _context.Add(newAccount); }