public static int Create(Models.Card card) { return(Sql.ExecuteScalar <int>( "Card_Create", new { card.listId, card.boardId, card.layout, card.colors, card.name, datedue = card.datedue == null ? DateTime.Now.AddYears(-100) : card.datedue, card.description } )); }
public static int Create(Models.Card card) { return(Sql.ExecuteScalar <int>( "Card_Create", new Dictionary <string, object>() { { "listId", card.listId }, { "boardId", card.boardId }, { "layout", card.layout }, { "colors", card.colors }, { "name", card.name }, { "datedue", card.datedue == null ? DateTime.Now.AddYears(-100) : card.datedue }, { "description", card.description } } )); }
public static int Import(Models.Card card, bool merge = false) { return(Sql.ExecuteScalar <int>( "Card_Import", new { card.listId, card.boardId, card.layout, card.colors, card.name, datedue = card.datedue == null ? DateTime.Now.AddYears(-100) : card.datedue, card.description, merge } )); }