예제 #1
0
        public async Task <int> AddRoleAsync(string title)
        {
            if (!string.IsNullOrWhiteSpace(title) && !await _dal.IsExistsAsync(r => r.Title == title))
            {
                return(await _dal.AddAsync(new Role { Id = Guid.NewGuid(), Title = title }));
            }

            return(-3);
        }