protected override void Seed(FavouriteContactContext context) { FavouriteContact favContact = new FavouriteContact { Id = Guid.NewGuid().ToString(), UserId = Guid.NewGuid().ToString(), FirstName = "Rena", LastName = "Yu", Department = "Human Resource", Email = "*****@*****.**", PhoneNumber = 0455845785 }; context.Set <FavouriteContact>().Add(favContact); base.Seed(context); }
public async Task <int> InsertFavouriteContact(string requesterId, Contact contact) { await SyncAsyncFavouriteContact(true); FavouriteContact favContact = new FavouriteContact() { UserId = requesterId, FirstName = contact.FirstName, LastName = contact.LastName, fullName = contact.FirstName + ", " + contact.LastName, Department = contact.Department, Email = contact.Email, PhoneNumber = contact.PhoneNumber, }; await azureSyncTableFavouriteContact.InsertAsync(favContact); await SyncAsyncFavouriteContact(); return(1); }