Friday, June 26, 2020
Thursday, June 11, 2020
Partial spacific property update in ef or single property or one property or spacific
[HttpPost]
public async Task<ActionResult> update_nominee(custreg_working d, string id)
{
using (var context = new db_context())
{
d.cust_id = id;
context.Configuration.ValidateOnSaveEnabled = false;
context.custreg_working.Attach(d);
System.Data.Entity.Infrastructure.DbEntityEntry<custreg_working> entry = context.Entry(d);
entry.Property(e => e.Nominee).IsModified = true;
entry.Property(e => e.Relation).IsModified = true;
entry.Property(e => e.nmob).IsModified = true;
await context.SaveChangesAsync();
}
return RedirectToAction("edit", new { id = d.cust_id });
}
Monday, June 8, 2020
sql recursion or recursion in sql server or go to
DECLARE @text VARCHAR(50) = NULL;
nn:
if(@text is not null)
begin
EXEC [dbo].[CreateRandomString] @minLength = 10,@maxLength = 10, @randomString = @text OUTPUT;
end
if(@text is null) begin
set @text='Pudzw6p5w'
end
if(select count(*) from product_keypin where pinkey=@text)>0
begin
print 'Duplicate'
goto nn
end else begin
print 'No Duplicate'
end;
Subscribe to:
Posts (Atom)
Linq Expression syntax for where condtion in linq
(Expression<Func<T, bool>> filter)
-
Page preview on single click VS2015 or further or on single click page open in solution explorer Menu>Tools>Options>Environment...
-
1.Class [MetadataType(typeof(auth_model_mas_meta))] public partial class auth_model_mas { public string model_id {...