private async Task <Database.Entities.Entity> AddEntityInternalAsync(string entityTypeName, string data) { var entityType = await GetOrAddEntityTypeInternalAsync(entityTypeName); var entity = new Database.Entities.Entity { Data = data, EntityTypeId = entityType.Id }; dbContext.Add(entity); return(entity); }
/// <summary> /// Method that adds an employee to the database /// </summary> /// <param name="employee"> /// Employee to be added /// </param> public void AddEmployee(Employee employee) { _context.Add(employee); _context.SaveChanges(); return; }
/// <summary> /// Method that adds a file to the database /// </summary> /// <param name="file"> /// File to be added /// </param> public void AddFile(File file) { _context.Add(file); _context.SaveChanges(); return; }