public async Task <Note> AddAsync(int entityId, string userId, string text, int?categoryId, bool hasStatus) { var newNote = new Note() { EntityId = entityId, UserId = userId, Text = text, CategoryId = categoryId, HasStatus = hasStatus, Date = DateTime.Now, IsCompleted = false }; return(await _repository.AddAsync(newNote)); }