SELECT setval('table_id_seq', (SELECT MAX(id) FROM table)+1);
public class Category { public int sequence{get;set;} public string categoryName{get;set;} }