/// <summary>
 /// Creates a new User.
 /// </summary>
 /// <param name="entityToCreate">User domain object with the properties to map to an Users table entity</param>
 public void Create(User entityToCreate)
 {
     var userTableEntry = entityToCreate.MapToUserEntity();
     _unitOfWork.Create(userTableEntry, "Users");
 }
 public void Create(User entityToCreate)
 {
     var user = entityToCreate.MapToUserEntity();
     Users.Add(user);
 }
 /// <summary>
 /// Updates an entity in the Users Azure Table.
 /// </summary>
 ///<param name="entityToUpdate">User domain object with the properties to update an existing Users table entity</param>
 public void Update(User entityToUpdate)
 {
     _unitOfWork.Update("Users", entityToUpdate.MapToUserEntity());
 }
        public void Update(User entityToUpdate)
        {
            var user = entityToUpdate.MapToUserEntity();
            var userToRemove = Users.First(n => n.PartitionKey == user.PartitionKey && n.RowKey == user.RowKey);

            Users.Remove(userToRemove);
            Users.Add(user);
        }