public HttpResponseMessage DeleteEvents(DeleteRequest model) { if (!ModelState.IsValid) { return Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState); } SuccessResponse response = new SuccessResponse(); _analyticsService.Delete(model); return Request.CreateResponse(response); }
public void Delete(DeleteRequest model) { DataProvider.ExecuteNonQuery(GetConnection, "dbo.Analytics_deleteMultiple", inputParamMapper: delegate (SqlParameterCollection paramCollection) { SqlParameter a = new SqlParameter("@Id", SqlDbType.Structured); if (model.Id != null && model.Id.Any()) { a.Value = new IntIdTable(model.Id); } paramCollection.Add(a); }, returnParameters: delegate (SqlParameterCollection param) { } ); }