Friday, July 4, 2025

Wish You Happy Independence Day -2025

Independence Day Flag

சுதந்திர தின விழா - 2025

விண்ணைத் தொடும் பாரதி கனவு
வெற்றி பெரும் வீரர் நினைவு,
அம்மா மண் தாயின் சுவாசம்,
ஆகஸ்ட் பதினைந்து – நம் பெருமை பாசம்!

வெள்ளைச் சாமரைக்கு எதிராக எழுந்தோம்,
வெற்றி பூந்தமிழ் பூங்காவில் பிறந்தோம்,
தியாகம் செய்தோரை நெஞ்சில் நிறுத்தி,
தாய்நாட்டுக்காய் வாழ்வை அர்ப்பணித்து!

சூரியன் உச்சியில் எழுவது போல்,
சுதந்திரம் நம் நாடு சூடிக்கொள்ள,
ஒற்றுமை எனும் தாரகை ஒளிர,
வந்தாடுவோம் சுதந்திர தினத்தை நெஞ்சமெல்லாம்!

- ராஜேஷ்குமார்


Wednesday, January 17, 2024

curd operation using dotnet with using azure cosmodb

controller: using AutoMapper; using Core.Data.Entities; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Identity.Web; using Microsoft.Identity.Web.Resource; using System.Collections.Generic; using System.Threading.Tasks; using TodoListAPI.Infrastructure; using System.Linq; using System; using Core.Models.Employees; namespace API.Controllers { [Authorize] [Route("api/[controller]")] [ApiController] public class FamilyController : ControllerBase { private readonly IDepartmentRepository departmentRepository; private readonly IFamilyRepository familyRepository; private readonly IDesignationRepository designationRepository; private readonly IMapper mapper; public FamilyController(IDepartmentRepository departmentRepository, IFamilyRepository familyRepository, IDesignationRepository designationRepository, IMapper mapper) { this.departmentRepository = departmentRepository; this.familyRepository = familyRepository; this.designationRepository = designationRepository; this.mapper = mapper; } // GET: api/todolist/getAll [HttpGet] [Route("GetAll")] [RequiredScope(RequiredScopesConfigurationKey = "AzureAd:Scopes")] [Authorize(Policy = AuthorizationPolicies.EmployeeGroupRequired)] public async Task>> GetAll() { var UserId = Guid.Parse(HttpContext.User.GetObjectId()); var result = (await familyRepository.FindAllAsync(x => x.CreatedBy== UserId)).ToList(); if (result != null) { return new OkObjectResult(new { Status = "true", Data = result.ToList() }); } return new OkObjectResult("false"); } [HttpPost] [Route("Update")] [RequiredScope(RequiredScopesConfigurationKey = "AzureAd:Scopes")] [Authorize(Policy = AuthorizationPolicies.AdminGroupRequired)] public async Task Add(Family request) { var UserId = Guid.Parse(HttpContext.User.GetObjectId()); var result = (await familyRepository.FindByAsync(x => x.ID == request.ID)).SingleOrDefault(); if (result == null) { var model = mapper.Map(request); model.CreatedBy = UserId; await familyRepository.AddAsync(model); } else { var model = mapper.Map(request); model.ID = request.ID; model.ModifiedBy = UserId; model.CreatedBy = request.CreatedBy; model.PartitionKey = result.PartitionKey; await familyRepository.UpdateAsync(model,model.ID); } return new OkObjectResult("true"); } [HttpDelete] [Route("Delete/{id:Guid}")] [RequiredScope(RequiredScopesConfigurationKey = "AzureAd:Scopes")] [Authorize(Policy = AuthorizationPolicies.AdminGroupRequired)] public async Task Delete(Guid id) { var UserId = HttpContext.User.GetObjectId(); var result = (await familyRepository.FindByAsync(x => x.ID == id)).SingleOrDefault(); if (result != null) { await familyRepository.DeleteAsync(result); return new OkObjectResult("true"); } return new OkObjectResult("false"); } [HttpGet] [Route("GetFamily/{EmpID}")] [RequiredScope(RequiredScopesConfigurationKey = "AzureAd:Scopes")] [Authorize(Policy = AuthorizationPolicies.AdminGroupRequired)] public async Task> GetId(Guid EmpID) { var UserId = Guid.Parse(HttpContext.User.GetObjectId()); var result = (await familyRepository.FindAllAsync(x => x.CreatedBy == EmpID)).ToList(); if (result == null) { return new OkObjectResult("false"); } return new OkObjectResult(result); } } } model: using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace Core.Models.Employees { public class Family { public Family() { ID = Guid.NewGuid(); PartitionKey = ID.ToString(); } [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)] public Guid ID { get; set; } public string PartitionKey { get; set; } public string Name { get; set; } public string PhoneNumber { get; set; } public string Relationship { get; set; } public DateTime? Birthday { get; set; } public Guid CreatedBy { get; set; } public Guid ModifiedBy { get; set; } } } core-->config-->models--coremodules: using Autofac; using Core.Data.Sql; using Core.Logging; using Core.Data.Entities; using Microsoft.EntityFrameworkCore; using Core.Services; //using Core.Data.Entities.Trading; namespace Core.Configuration { public class CoreModule : Module { protected override void Load(ContainerBuilder builder) { var dbContextOptionsBuilder = new DbContextOptionsBuilder(); builder.RegisterType().As().SingleInstance(); // Logging builder.RegisterModule(); //Data.SQL //builder.RegisterType().AsImplementedInterfaces().InstancePerLifetimeScope(); builder.RegisterType() .WithParameter("options", dbContextOptionsBuilder.Options) .InstancePerDependency(); builder.RegisterGeneric(typeof(GenericRepository<>)).As(typeof(IGenericRepository<>)).InstancePerLifetimeScope(); } } } core-->config-->Data-->Entity: IFamilyRepository using Core.Data.Sql; using Core.Models.Employees; using System; namespace Core.Data.Entities { public interface IFamilyRepository : IGenericRepository { } } FamilyRepository using Core.Data.Sql; using System; ; using Core.Models.Employees; namespace Core.Data.Entities { public class FamilyRepository : GenericRepository, IFamilyRepository { private readonly SqlDataContext dataContext; public FamilyRepository(Func dataContextFactory) : base(dataContextFactory) { } } } core-->config-->Data-->sqlDataContext: using Microsoft.EntityFrameworkCore; using JetBrains.Annotations; using Core.Models.Holidays; using Core.Models.Employees; using Core.Models; using Microsoft.Extensions.Configuration; using Core.Models.Resume; //using Core.Models.Trading; // ReSharper disable StringLiteralTypo namespace Core.Data.Sql { [UsedImplicitly] public class SqlDataContext : DbContext { private readonly IConfiguration configuration; public DbSet? Families { get; set; } public SqlDataContext(IConfiguration configuration, DbContextOptions options) : base(options) { this.configuration = configuration; if (Convert.ToBoolean(this.configuration["Environment:CosmosDatabaseCollectionCreate"])) Database.EnsureCreated(); } protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { //optionsBuilder.UseSqlServer(environment.SqlConnection); optionsBuilder.UseCosmos(configuration["Environment:CosmosEndPoint"], configuration["Environment:CosmosAccountKey"], configuration["Environment:CosmosDatabaseName"]); if (Convert.ToBoolean(this.configuration["Environment:CosmosDatabaseCollectionCreate"])) base.OnConfiguring(optionsBuilder); } #region Fields //private readonly EnvironmentSettings environmentSettings; //#endregion //#region Constructors //public SqlDataContext(EnvironmentSettings environmentSettings) //{ // this.environmentSettings = environmentSettings; // Database.EnsureCreated(); // //SQL Command Timeout will be config driven. // if (environmentSettings.SqlCommandTimeout > 0) // Database.SetCommandTimeout(environmentSettings.SqlCommandTimeout); //} //#endregion //#region Properties //public DbSet Users { get; set; } //public DbSet JobSiteAccounts { get; set; } //public DbSet JobSiteEmails { get; set; } //public DbSet JobSiteHistories { get; set; } //public DbSet JobSiteKeyWords { get; set; } //public DbSet JobSiteQuestions { get; set; } //public DbSet JobSiteResumes { get; set; } //public DbSet Symbols { get; set; } //public DbSet SymbolSettings { get; set; } //public DbSet TradeSettings { get; set; } //public DbSet TradeHistorys { get; set; } ////public DbSet
▂ ▄ ▅ ▇ Happy Diwali ▇ ▅ ▄ ▂


















































































OFFPOIL RAJESHKUMAR


Let the flame of the candles
and the earthen lamp cleanse
your heart, mind, and soul.
thereby enriching your connection
with the almighty
Wish you a joyful celebration of the festival
வார்த்தைகளில் ஒளி ஏந்தி
வர்ணமதாய் மொழி கொண்டு
எட்டுத்திக்கும் ஒலிக்க
வட துருவத்திலிருந்து ஓர் வாழ்த்து மடல் தித்திக்கும்
இனிய தீபாவளி நல் வாழ்த்துக்கள்!!!

!! Happy Diwali BY RockRajesh!!




Wish Your Friends
Family Members !!


  🌠SHARE WITH YOUR FRIENDS🌠




enter your name and share ur frds
Go
Share with your Friends
. .

Thursday, November 12, 2020

WISH U HAPPY DIWALI FRIENDS

HAPPY DIWALI 2020 |இனிய தீபாவளி வாழ்த்துக்கள்
▁ ▂ ▄ ▅ ▆ ▇ தீபாவளி வாழ்த்துக்கள் ▇ ▆ ▅ ▄ ▂ ▁

Snow

Wishing You

Offoil Guys Rocky

Main Image

May the divine light of Diwali bring into your life peace, prosperity, happiness and good health.
Happy Diwali

|புதிய உடை பூரிப்பில்| இனிபுகலின் சுவையூர| ஒளி தீபம் வீதி எங்கிருந்தாலும்| உர்ச்சகம் உல்லமெங்கூம் தீபம் ஒளி திருநாலின்| அன்பான வாழ்த்துக்கள்| by ராஜேஷ் குமார்
Happy Diwali

Main Image


Main Image



Share

Wish You Happy Independence Day -2025

Independence Day Flag சுதந்திர தின விழா - 2025 விண்ணைத் தொடும் பாரதி கனவு வெற்றி பெரும் வீரர் நினைவு, அம்மா மண் தாயின் சுவ...