public CreateClusterRequest( IEnvironment environment, ILocation location, IHostTemplate hostTemplate, JsonObject properties = null) { Ensure.NotNull(environment, nameof(environment)); Ensure.NotNull(location, nameof(location)); EnvironmentId = environment.Id; LocationId = location.Id; Name = environment.Name + "/" + location.Name; HostTemplate = hostTemplate; Properties = properties ?? new JsonObject(); }
public async Task <bool> DeleteAsync(IHostTemplate template) { return(await db.HostTemplates.PatchAsync(template.Id, new[] { Change.Replace("deleted", Func("NOW")) }, condition : IsNull("deleted")) > 0); }