public tbl_UserLogin AddLogin(tbl_UserLogin claim) { claim.CreatedUtc = Clock.UtcDateTime; _context.Set<tbl_UserLogin>().Add(claim); return claim; }
private void Insert_tbl_UserLogin(tbl_UserLogin obj_tbl_UserLogin, SqlTransaction trans, SqlConnection cn) { string strQuery = ""; strQuery = " set dateformat dmy;insert into tbl_UserLogin ( [Login_AddedBy],[Login_Addeddatetime],[Login_password],[Login_PersonId],[Login_Status],[Login_UserName] ) values ('" + obj_tbl_UserLogin.Login_AddedBy + "',getdate(),'" + obj_tbl_UserLogin.Login_password + "','" + obj_tbl_UserLogin.Login_PersonId + "','" + obj_tbl_UserLogin.Login_Status + "','" + obj_tbl_UserLogin.Login_UserName + "');Select @@Identity"; if (trans == null) { try { ExecuteSelectQuery(strQuery); } catch { } } else { ExecuteSelectQuerywithTransaction(cn, strQuery, trans); } }
public tbl_UserLogin RemoveLogin(tbl_UserLogin login) { _context.Set<tbl_UserLogin>().Remove(login); return login; }