public async Task <TagType> CreateTagTypeAsync(string name, string description, int minCount, int maxCount) { try { var tt = new TagType() { Name = name, Description = description, MinCount = minCount, MaxCount = maxCount }; tt.Initialize(UIDGenerator.Next(1)); await taggerDataContext.TagsRepository.InsertTagTypeAsync(tt); await taggerDataContext.SaveChangesAsync(); return(tt); } catch (Exception ex) { //todo log error throw; } }