public Task CreateAsync(Guid sendTo, Guid creator, MessageType type, string creatorName) { dbContext.Add( new Notification { SendTo = sendTo, Creator = creator, IsRead = false, MessageType = type, DateCreated = DateTime.UtcNow, CreatorName = creatorName, }); return(dbContext.SaveChangesAsync()); }
public Task CreateAsync(string storageProviderId, string name, Guid creator, DateTime created) { var document = new Document { StorageProviderId = storageProviderId, Name = name, Creator = creator, Created = created }; dbContext.Add(document); return(dbContext.SaveChangesAsync()); }