Example #1
0
        public async Task <UpdateResult> Update(ProcessEntity process)
        {
            var update = new UpdateDefinitionBuilder <ProcessEntity>()
                         .Set(x => x.Description, process.Description)
                         .Set(x => x.Name, process.Name)
                         .Set(x => x.UpdatedBy, process.UpdatedBy)
                         .Set(x => x.LastUpdated, DateTime.Now);

            return(await _processsServicesCollection.UpdateOneAsync(x => x.Id == process.Id, update));
        }
Example #2
0
 public async Task Put([FromBody] ProcessEntity entity)
 {
     await _processesRepo.Update(entity);
 }
Example #3
0
 public async Task Post([FromBody] ProcessEntity entity)
 {
     await _processesRepo.Create(entity);
 }
Example #4
-1
 public async Task Create(ProcessEntity process)
 {
     process.Created = DateTime.Now;
     process.Deleted = false;
     await _processsServicesCollection.InsertOneAsync(process);
 }