Example #1
0
        public async Task <Pin> Add(Pin data)
        {
            try
            {
                await _context.AddAsync(data);

                await _context.SaveChangesAsync();

                return(data);
            }
            catch (Exception e)
            {
                throw e;
            }
        }
Example #2
0
        public async Task <User> Add(User newUser)
        {
            try
            {
                await _context.Users.AddAsync(newUser);

                await _context.SaveChangesAsync();

                return(newUser);
            }
            catch (Exception e)
            {
                throw e;
            }
        }