aboutsummaryrefslogtreecommitdiff
path: root/src/DevHive.Data/Repositories/UserRepository.cs
blob: 5bd9d97982ca7374b8e0c70e3f5f034a43476196 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Data.Models.Interfaces.Database;
using DevHive.Data.Models;

namespace DevHive.Data.Repositories
{
	public class UserRepository : IRepository<User>
	{
		/* private readonly UserRepository<User> _dbRepository;

		public UserRepository(DbContext context)
			: base (context)
		{
			this._dbRepository = new DbRepository<User>(context);
		}

		public User FindByUsername(string username)
		{
			return this._dbRepository.DbSet
				.FirstOrDefault(usr => usr.UserName == username);
		}

		public bool DoesUsernameExist(string username)
		{
			return this._dbRepository.DbSet
				.Any(x => x.UserName == username);
		}

		public bool DoesUserExist(Guid id)
		{
			return this._dbRepository.DbSet
				.Any(x => x.Id == id);
		}
	
		public bool HasThisUsername(Guid id, string username)
		{
			return this._dbRepository.DbSet
				.Any(x => x.Id == id &&
					x.UserName == username);
		} */

		public Task AddAsync(User entity)
		{
			throw new System.NotImplementedException();
		}

		public IEnumerable<User> Query(int count)
		{
			throw new System.NotImplementedException();
		}

		public Task<User> FindByIdAsync(object id)
		{
			throw new System.NotImplementedException();
		}

		public Task EditAsync(object id, User newEntity)
		{
			throw new System.NotImplementedException();
		}

		public Task DeleteAsync(object id)
		{
			throw new System.NotImplementedException();
		}
	}
}