public DTOResponse <DTOCoat> Update(DTOCoat updateInfo) { var model = updateInfo.ToModel(); _collection.UpdateOne <CoatModel>(coat => coat.Id == updateInfo.Id, Builders <CoatModel> .Update.Set("Name", updateInfo.Name)); return(new DTOResponse <DTOCoat>() { Code = 200 }); }
public DTOResponse <DTOCoat> Create(DTOCoat createInfo) { var model = createInfo.ToModel(); _collection.InsertOne(model); return(new DTOResponse <DTOCoat>() { Code = 200 }); }